from nettong.celery import celery_app
import time
from django_redis import get_redis_connection

cache = get_redis_connection('default')
@celery_app.task
def send_email(name):
  print(f'准备发送{name}的邮件')
  time.sleep(5)
  print( f'{name}的邮件发送成功')
  return 'OK1'

@celery_app.task
def send_sms(name):
  print(f'准备发送{name}的短信')
  time.sleep(5)
  print( f'{name}的短信发送成功')
  return 'OK2'